﻿<%@ Page Title="" Language="C#" MasterPageFile="Home.master" %>

<script runat="server">
    private int Item_Id = 0;
    private Text MyText;
    private int Item_Lang = 1;
    private string RealText;
    protected void Page_Load(object sender, EventArgs e)
    {

        Item_Lang = Utils.GetQueryString("lang", 1);
        Item_Id = Convert.ToInt32(Utils.GetQueryString("Id",1));
        MyText = new Text(Item_Id, "", false);
        RealText = FormatHtmlCode(MyText.Item_Story);
    }
    private string FormatHtmlCode(string Text_Value)
    {
        /* 多余的空格处理 */
        Text_Value = Text_Value.Replace("&amp;", "&");
        Text_Value = Text_Value.Replace("&nbsp;", " ");
        //Text_Value = Text_Value.Replace("  ", "");
        /* 双引号处理 */
        Text_Value = Text_Value.Replace("&quot;", "\"");
        Text_Value = Text_Value.Replace("&lt;", "<");
        Text_Value = Text_Value.Replace("&gt;", ">");
        Text_Value = Text_Value.Replace("<br />", "");
        Text_Value = Text_Value.Replace("<br>", "");
        Text_Value = Text_Value.Replace("_s", "_sss");
        Text_Value = Text_Value.Replace("/pulgin/kindeditor/asp.net/../../", "");
        //Text_Value = Text_Value.Replace("\n", "");
        /* 优酷播放器进行重编 */
        Text_Value = Text_Value.Replace("<embed", "<embed allowfullscreen=\"true\"");
        Text_Value = Utils.HtmlDecode(Text_Value);
        return Text_Value;
    }
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title><%=MyText.Item_Title %> - <%=Lang.Show("WenSizeName")%></title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="View">
        <div class="layout">
        <!-- 页面二维码生成 -->
        <img src="http://s.jiathis.com/qrcode.php?url=<%=Utils.UrlEncode(Request.Url.ToString()).ToLower().Replace("home","m") %>" class="tocode" />
        <!-- 当前位置 -->
        <div id="Map">
            <a href="../home/?lang=<%=Utils.GetQueryString("lang",1) %>"><%=Lang.Show("Home")%> </a>
            <a href="News-List.aspx?cid=<%=MyText.Item_Column %>&lang=<%=Utils.GetQueryString("lang",1) %>"><%=MyText.Item_Column_Name %></a>
        </div>
        <!--文章标题-->
        <h2><%=MyText.Item_Title %></h2>
        <div class="ch"></div>
        <!-- 文章摘要 -->
        <div id="Summary"><%=Lang.Show("Summary")%> : <%=MyText.Item_Summary %></div>
        <!-- 文章内容 -->
        <div id="Content"><%=RealText%></div>
        <!-- 文章发布信息 -->
        <div id="Text_Info"><%=Lang.Show("Published")%> : <%=MyText.Item_Time.ToString("yyyy/MM/dd") %>  </div>
    </div>
        </div>
</asp:Content>

